home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.2
/
Video Toaster v4.2.iso
/
arexx
/
editor
/
volumerel.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-12-22
|
2KB
|
87 lines
/* RelProjectVolume.rexx V3.0 -- Changes the volume of a project globaly */
/* By Bob Caron (Grue) ©1995 NewTek Inc. */
arg frompopup
if frompopup="" then frompopup=0
call remlib('PROJECT_REXX_PORT')
call addlib('PROJECT_REXX_PORT',0)
call set_view(2)
call req_error("RelProjectVolume V3.0 --- Change project volume by value.")
done=0
do while done=0
selection=req_tell("Max RelProject Volume V3.0","'Continue' to effect ALL croutons","'Cancel' to effect selected croutons")
done=1
if selection=0 & frompopup=0 then do
if req_tell("Error:","You can only use this feature if you","launch this script from the tools","popup menu.")=0 then call quit()
done=0
end
end
if selection=1 then frompopup=0 else frompopup=1
project_end=croutonsinproject()
location=1
do count=1 to project_end
if croutonselectedpos(count)=1 | frompopup=0 then do
selected.location=count-1
location=location+1
end
end
location=location-1
current_spot=0
highvol=0
volume=req_string("Raise/Lower Project volume by:",-10)
if volume="CANCEL" then call quit
if req_tell("Are you sure?")=0 then call quit()
if volume=0 then call quit()
volume=(volume*655.35)
current_spot=0
call req_open("Working... Please wait.")
chunk=100/location;last=0;dots=0
do count=1 to location
if crnumtype(selected.count)="CLIP" | crnumtype(selected.count)=" AUD" then do
vol1=(crnumgettag(selected.count,AUDIOVOLUME1)+volume)
if vol1<0 then vol1=0
if vol1>65535 then vol1=65535
call crnumsettag(selected.count,AUDIOVOLUME1,vol1)
vol2=(crnumgettag(selected.count,AUDIOVOLUME2)+volume)
if vol2<0 then vol2=0
if vol2>65535 then vol2=65535
call crnumsettag(selected.count,AUDIOVOLUME2,vol2)
last=trunc(dots/10)+1
dots=dots+chunk;string=copies(".",trunc(dots/10)+1)
if (last~=trunc(dots/10)+1) then do
if (11-length(string)>-1) then
call req_error("[Working"||string||right(' ',11-length(string))||"]")
end
end
end
call req_close()
call req_error("")
call req_error("All done.")
call projectupdate()
call remlib("PROJECT_REXX_PORT")
exit
quit:
call req_error("Canceled.")
call remlib("PROJECT_REXX_PORT")
exit
croutonselectedpos:
arg pos
row=trunc(pos/8)
col=pos-(row*8)
row=row+1
return croutonselected(row,col)